Currently, in the field of data transmission technologies, the PCIe protocol has been widely applied. When the PCIe protocol is applied to devices, data transmission is performed between the devices in a point-to-point form. Devices performing data transmission by using the PCIe protocol are collectively referred to as PCIe apparatuses. In a system, a link connection can be implemented for communication between two PCIe apparatuses by using a Serializer/De-Serializer (serdes) circuit. When the two PCIe apparatuses perform data transmission, data transmission is performed by using the serdes at a negotiated rate. A link between the two PCIe apparatuses may include 1, 2, 4, 8, 16, or 32 serdes circuits. When there are multiple serdes circuits, these serdes circuits are successively numbered by using continuous numbers in ascending order. One serdes is one lane of the link, and a serdes number is referred to as a lane number.
A bandwidth (W) of data transmission between two PCIe apparatuses is equal to a product of a quantity of lanes (N) and a negotiated rate (S), that is, a bandwidth formula is W=N×S. The negotiated rate (S) of the link between the two PCIe apparatuses varies with a version of the used PCIe protocol, and currently, there are four types of negotiated rates, which are GEN1 (2.5 GT/s), GEN2 (5.0 GT/s), GEN3 (8.0 GT/s), and GEN4 (16.0 GT/s), indicating a capacity of data that can be transmitted by one circuit in one second. Generally, a negotiated rate (S) supported by a link of one PCIe apparatus is fixed, and in this case, to meet increasingly high user requirements of a communication bandwidth (W), the bandwidth can be improved only by increasing the quantity of lanes (N) of the link.
When two PCIe apparatuses transmit data, all lanes of a link between the two PCIe apparatuses need to be used simultaneously. If a fault occurs in one of the lanes, data transmission is interrupted. In the prior art, when a fault occurs in a lane connected to a PCIe apparatus, the PCIe apparatus performs link negotiation according to a re-negotiation mechanism of the PCIe protocol. During link negotiation, negotiation is performed starting from a lane with a smallest lane number, and link negotiation is successively performed in ascending order of lane number. A manner of performing link re-negotiation continuously in ascending order of lane number is referred to as upward negotiation. For example, when a fault occurs in a lane No. 2 of a PCIe apparatus that originally needs to negotiate for a rate of GEN2 and a link width of 16 (PCIe2.0×16), the PCIe apparatus performs link negotiation upward starting from a lane No. 0 according to the re-negotiation mechanism of the PCIe protocol. Negotiation cannot be performed successfully on the lane No. 2 because of the fault in the lane No. 2, and after negotiation is performed from the lane No. 0 to a lane No. 1, link negotiation cannot continue. In this case, negotiation is performed successfully only on 2 lanes: the lane No. 0 and the lane No. 1; that is, data transmission can continue only in the lane No. 0 and the lane No. 1. According to a lane width of a link between two PCIe apparatuses that is stipulated in the PCIe protocol, a lane width of the link between the two PCIe apparatuses is 2, which is obtained by means of re-negotiation; that is, only 2 lanes can be provided for the PCIe apparatuses to transmit data. In this case, N in the bandwidth formula is changed from the original 16 to 2, and performance of data transmission between the PCIe apparatuses is only ⅛ of original performance. However, if a fault occurs in the lane No. 1, only one lane can be negotiated for according to the foregoing re-negotiation method; in this case, data transmission performance is only 1/16 of the original performance.
It can be seen that in the prior art, when a fault occurs in a lane of a link between PCIe apparatuses, re-negotiation for a lane width of the link is greatly restricted by a lane number of the faulty lane, which leads to uncertainty about the lane width obtained by means of re-negotiation and a case in which the lane width is greatly reduced, severely affecting data transmission performance of a lane.